package com.cls.business.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.cls.business.entity.ApplicantInfo;
import com.cls.common.annotation.EncryptParam;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

/**
 * 申请人信息表 Mapper
 *
 * @author wandering
 * @date 2020-11-11 18:15:13
 */
@Repository
public interface ApplicantInfoMapper extends BaseMapper<ApplicantInfo> {
    @Select("select * from biz_applicant_info where identity = #{identity} limit 1")
    ApplicantInfo findByIdentity(@EncryptParam("identity") @Param("identity") String identity);

    @Select("select * from biz_applicant_info where user_id=#{userId} and is_delete=0 limit 1")
    ApplicantInfo findByUserId(@Param("userId") Long userId);

}
